//
//  SocketStringReader.h
//  Socket.IO-Client
//
//  Created by alanwang.dev on 16/8/8.
//  Copyright © 2016年 com.alanwang.dev. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface SocketStringReader : NSObject

@property (nonatomic, copy) NSString *message;
//var currentIndex: String.Index
@property (nonatomic, assign) NSUInteger currentIndex;
@property (nonatomic, assign) BOOL hasNext;

@property (nonatomic, copy) NSString *currentCharacter;

- (instancetype)initWithMessage:(NSString *)message;

- (void)advanceIndexBy:(NSInteger)n;

- (NSString *)read:(NSInteger)readLength;

- (NSString *)readUntilStringOccurence:(NSString *)string;

- (NSString *)readUntilEnd;

@end
